package com.work.demo;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableScheduling
@EnableAspectJAutoProxy(exposeProxy = true)
public class WorkTestApplication {

	public static void main(String[] args) {
		SpringApplication.run(WorkTestApplication.class, args);
	}

	@Bean
	public Redisson redisson() {
		Config config = new Config();
		config.useSingleServer().setAddress("redis://localhost:6379").setDatabase(0);
		return (Redisson) Redisson.create(config);
	}

}
